package com.frontend.fileservice.cs.impl;

import com.frontend.fileservice.cs.IProcessRule;
import com.frontend.fileservice.cs.dco.cslei;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;

public class juliyouxIProcessRule implements IProcessRule<cslei> {
    public juliyouxIProcessRule(IProcessRule cslei) {
        this.csleia = cslei;
    }
    public juliyouxIProcessRule() {

    }

      private IProcessRule csleia;
    @Override
    public List<cslei> filter(List<cslei> serveProviderDTOS) {
        return Collections.emptyList();
    }

    @Override
    public IProcessRule next() {
        return csleia;
    }
    public List<cslei>   dofilter(List<cslei> serveProviderDTOS){
        List<cslei> collect = serveProviderDTOS.stream().sorted((Comparator.comparing(cslei::getJuli).reversed()))
                .collect(Collectors.toList());
        return collect;

    }
}
